<html>
<head><meta charset="utf-8"><title>Miri formatting wrong · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html">Miri formatting wrong</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="157928647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157928647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157928647">(Feb 09 2019 at 12:31)</a>:</h4>
<p>oO compare the output of this program when running normally and with Miri: <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e138c2cf2dbc6c36912b575c04bf2643" target="_blank" title="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e138c2cf2dbc6c36912b575c04bf2643">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e138c2cf2dbc6c36912b575c04bf2643</a></p>



<a name="157928649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157928649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157928649">(Feb 09 2019 at 12:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span>  seems like somehow filling does not work when running in Miri?</p>



<a name="157929584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157929584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157929584">(Feb 09 2019 at 13:03)</a>:</h4>
<p>somehow passing the formatting information (the width, in this case) does not work. that's some awful unsafe code if I recall correctly...</p>



<a name="157930186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157930186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157930186">(Feb 09 2019 at 13:20)</a>:</h4>
<p>uuhhh... I got it</p>
<div class="codehilite"><pre><span></span>self.formatter as usize == ArgumentV1::show_usize as usize
</pre></div>



<a name="157930187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157930187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157930187">(Feb 09 2019 at 13:20)</a>:</h4>
<p>this code compares function pointers</p>



<a name="157930189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157930189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157930189">(Feb 09 2019 at 13:20)</a>:</h4>
<p>and relies on stable addresses</p>



<a name="157931157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157931157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157931157">(Feb 09 2019 at 13:51)</a>:</h4>
<p>see <a href="https://github.com/rust-lang/rust/issues/58320" target="_blank" title="https://github.com/rust-lang/rust/issues/58320">https://github.com/rust-lang/rust/issues/58320</a></p>



<a name="157968269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Miri%20formatting%20wrong/near/157968269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Miri.20formatting.20wrong.html#157968269">(Feb 10 2019 at 09:43)</a>:</h4>
<p>Something will go horribly wrong in const eval and pointer comparison code some day</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>